Skip to content

[pull] develop from tronprotocol:develop#152

Merged
pull[bot] merged 22 commits into
All-Blockchains:developfrom
tronprotocol:develop
May 8, 2026
Merged

[pull] develop from tronprotocol:develop#152
pull[bot] merged 22 commits into
All-Blockchains:developfrom
tronprotocol:develop

Conversation

@pull

@pull pull Bot commented May 8, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

yanghang8612 and others added 22 commits May 6, 2026 10:27
Raise the floor to 500, switch the >32-byte branch to 2*words²,
and bump the long-exponent multiplier to 16. Drop the OSAKA gate's
config-file plumbing — the on-chain proposal is the only switch.
Verify the new floor, the doubled-formula branch at the 33-byte
boundary, and that pre-OSAKA pricing is preserved when the gate
is off.
Cover CLZ in [128, 247] to exercise the (byte) cast through
DataWord.of(byte), and pin the IllegalOperationException
when allowTvmOsaka=0.
Make overflow safety explicit instead of relying on int range, and
keep all arithmetic in the new energy helpers consistent with the
existing StrictMathWrapper-based ops.
Activates via ALLOW_TVM_PRAGUE proposal: deploy() installs the
BlockHashHistory bytecode + metadata at the canonical address;
write() propagates parent hashes to a 8191-slot ring buffer.
processBlock writes the parent block hash before iterating
transactions; generateBlock did not, so the producer's simulation
loop saw a stale/empty slot at HISTORY_STORAGE_ADDRESS while
validators saw the live value. Mirror processBlock's call order.
…lockhash

feat(vm): implement TIP-2935 serve historical block hashes from state
…-test-fixes

# Conflicts:
#	framework/src/test/java/org/tron/common/runtime/vm/AllowTvmOsakaTest.java
feat(vm): implement TIP-7939 CLZ opcode
feat(vm): implement TIP-7883 ModExp gas cost increase
* feat(framework,actuator,common): replace fastjson with jackson

Replace `com.alibaba:fastjson` with Jackson-backed drop-in
wrappers (`org.tron.json.{JSON, JSONObject, JSONArray, JSONException}`).
No external API changes — all HTTP and JSON-RPC responses remain identical.

Motivation:
- Fastjson 1.2.83 is EOL with 20+ CVEs including critical RCE
- Upgrade jackson-databind 2.18.3 → 2.18.6 (GHSA-72hv-8253-57qq)
- Unify JSON handling (previously split between Jackson and Fastjson)

Core changes (common):
- Add org.tron.json wrappers backed by a shared ObjectMapper
- Remove fastjson from common/build.gradle

HTTP & servlet changes (framework):
- Swap imports from com.alibaba.fastjson → org.tron.json across
all HTTP servlets, JSON-RPC layer, and event/log parsers

Test changes:
- Add BaseHttpTest base class for servlet test lifecycle

Build:
- Update jackson to 2.18.6
- Remove fastjson

close #6607

* fix(test): remove trailing whitespace in GetDelegatedResourceAccountIndexV2ServletTest

* test(framework): add buildTransaction test

* refactor(common): tighten TypeUtils visibility and drop unused casts

* refactor(common): mark org.tron.json wrappers as @deprecated

* refactor(common): drop unused JSONException(Throwable) constructor

* test(framework): expand org.tron.json wrapper test coverage

* feat(common,framework): cap JSON parse depth and token count

* fix(common): match Fastjson 1.x NaN/Infinity/NULL behavior

* fix(json): align jackson parser with fastjson defaults

* test(json): remove Fastjson

* fix(json): reject unsupported fastjson edge cases

* test(json): cover duplicate field names

* fix(json): retain single trailing comma support

* refactor(trace): inline program trace json serialization

* fix(test): remove fastjson

* fix(test): use toLowerCase(Locale.ROOT)
@pull pull Bot locked and limited conversation to collaborators May 8, 2026
@pull pull Bot added the ⤵️ pull label May 8, 2026
@pull pull Bot merged commit 9529fb8 into All-Blockchains:develop May 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants